library ieee;
use ieee.std_logic_1164.all;
use work.processor_functions.all;
entity controller is
	generic (
		n : integer := 16
	);
	port (
		clk : in std_logic;
		nrst : in std_logic;
		ir_load : out std_logic;
		ir_valid : out std_logic;
		ir_address : out std_logic;
		pc_inc : out std_logic;
		pc_load : out std_logic;
		pc_valid : out std_logic;
		mdr_load : out std_logic;
		mar_load : out std_logic;
		mar_valid : out std_logic;
		m_en : out std_logic;
		m_rw : out std_logic;
		alu_cmd : out std_logic_vector(2 downto 0);
		control_bus : inout std_logic_vector(n-1 downto 0)
	);
end entity controller;